package sf.model.fields;

public class BoolFieldModel extends AbstractFieldModel
{

	private boolean selected;
	private String name;

	public BoolFieldModel()
	{

	}

	public BoolFieldModel(String name)
	{
		setName(name);
	}

	public Object getValue()
	{
		return isSelected() ? true : false;
	}

	public void setValue(Object value)
	{
		setSelected((Boolean) value);
		fireChanged();
	}

	public void clear()
	{
		setSelected(false);
	}

	public boolean isSelected()
	{
		return selected;
	}

	public void setSelected(boolean selected)
	{
		this.selected = selected;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}
}
